/**
 * 汪孟苹.
 */
define([],function(){
    var tpl = {};

    tpl.loading = function(){
        return loading();
    };
    tpl.history = function(){
        return history();
    };
    tpl.info = function(){
        return info();
    };
    tpl.tab = function(){
        return tab();
    };
    tpl.result = function(){
        return result();
    };
    tpl.trends = function(){
        return trends();
    };
    tpl.trendsPrint = function(){
        return trendsPrint();
    };

    var loading = function(){
        return  '<script id="growthDetail_loading" type="text/html">'+
                '   <div class="lc-content-loading">'+
                '       <div class="loader-inner ball-pulse">'+
                '           <div></div>'+
                '           <div></div>'+
                '           <div></div>'+
                '       </div>'+
                '   </div>'+
                '</script>';
    }
    var history = function(){
        return  '<script id="growthDetail_history" type="text/html">' +
                '   {{each list as value i}}' +
                '       <li recordId="{{value.recordId}}" gender="{{value.gender}}">{{value.testTime}}</li>'+
                '   {{/each}}'+
                '</script>';
    };
    var info = function(){
        return  '<script id="growthDetail_info" type="text/html">' +
                '   <ul class="clear infoList {{if gender=="F"}}girlsRed {{else}}boyBlue {{/if}} {{if pregnancyDay < 259}}width_5{{else}}width_4{{/if}}">'+
                '       <li>姓名<br/><span>{{userName}}</span></li>'+
                '       <li>性别<br/><span>{{if gender=="F"}}女{{else}}男{{/if}}</span></li>'+
                '       <li>孕周<br/><span>{{pregnancyWeek}}</span></li>'+
                '       {{if pregnancyDay < 259}}'+
                '           <li>纠正年龄<br/><span>{{correctAge}}</span></li>'+
                '           <li>实际年龄<br/><span>{{actualAge}}</span></li>'+
                '       {{else}}'+
                '           <li>年龄<br/><span>{{actualAge}}</span></li>'+
                '       {{/if}}'+
                '   </ul>'+
                '</script>';
    };
    var tab = function(){
        return  '<script id="growthDetail_tab" type="text/html">' +
                '    <ul class="{{if gender=="F"}}girlTab{{else}}boyTab{{/if}} cleafix {{if pregnancyDay < 259}}premature{{/if}}">'+
                '       {{if pregnancyDay < 259}}'+
                '           <li type="age">'+
                '               <div ageType="02">实际年龄</div>'+
                '               <div ageType="01" class="active">纠正年龄</div>'+
                '           </li>'+
                '       {{/if}}'+
                '       <li type="score">'+
                '           <div scoreType="01" class="active">百分位曲线图</div>'+
                '           <div scoreType="02">Z评分曲线图</div>'+
                '       </li>'+
                '    </ul>'+
                '</script>';
    }; 
    var result = function(){
        return  '<script id="growthDetail_result" type="text/html">' +
                '       <ul class="babyResult clearfix {{if userInfo.gender=="F"}}girlsB{{else}}boyB{{/if}}">'+
                '           <li>'+
                '               <div class="res-border">'+
                '                   <div class="ev-title">整体发育情况</div>'+
                '                   <font class="ev-res {{if result.wLStatus=="1"}}c-warn{{else if result.wLStatus=="2"}}c-danger{{/if}}">{{result.wLSumary}}</font>'+
                '               </div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="res-border">'+
                '                   <div class="ev-title"><span class="heightName">身长</span></div>'+
                '                   <font class="ev-res {{if result.heightStatus=="1"}}c-warn{{else if result.heightStatus=="2"}}c-danger{{/if}}">{{result.heightSumary}}</font>'+
                '               </div>'+
                '               <div class="clearfix">'+
                '                   <div class="res-left">'+
                '                       <font {{if result.heightStatus=="1"}}class="c-warn"{{else if result.heightStatus=="2"}}class="c-danger"{{/if}}>{{result.height}}</font><br/>'+
                '                       <font>测量值(cm)</font>'+
                '                   </div>'+
                '                   <div class="res-right">'+
                '                       <font {{if result.heightStatus=="1"}}class="c-warn"{{else if result.heightStatus=="2"}}class="c-danger"{{/if}}>{{result.heightRange}}</font><br/>'+
                '                       <font>百分位(%)</font>'+
                '                   </div>'+
                '               </div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="res-border">'+
                '                   <div class="ev-title">体重</div>'+
                '                   <font class="ev-res {{if result.weightStatus=="1"}}c-warn{{else if result.weightStatus=="2"}}c-danger{{/if}}">{{result.weightSumary}}</font>'+
                '               </div>'+
                '               <div class="clearfix">'+
                '                   <div class="res-left">'+
                '                       <font {{if result.weightStatus=="1"}}class="c-warn"{{else if result.weightStatus=="2"}}class="c-danger"{{/if}}>{{result.weight}}</font><br/>'+
                '                       <font>测量值(kg)</font>'+
                '                   </div>'+
                '                   <div class="res-right">'+
                '                       <font {{if result.weightStatus=="1"}}class="c-warn"{{else if result.weightStatus=="2"}}class="c-danger"{{/if}}>{{result.weightRange}}</font><br/>'+
                '                       <font>百分位(%)</font>'+
                '                   </div>'+
                '               </div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="res-border">'+
                '                   <div class="ev-title">头围</div>'+
                '                   <font class="ev-res {{if result.headStatus=="1"}}c-warn{{else if result.headStatus=="2"}}c-danger{{/if}}">{{result.headSumary}}</font>'+
                '               </div>'+
                '               <div class="clearfix">'+
                '                   <div class="res-left">'+
                '                       <font {{if result.headStatus=="1"}}class="c-warn"{{else if result.headStatus=="2"}}class="c-danger"{{/if}}>{{result.headCircumference}}</font><br/>'+
                '                       <font>测量值(cm)</font>'+
                '                   </div>'+
                '                   <div class="res-right">'+
                '                       <font {{if result.headStatus=="1"}}class="c-warn"{{else if result.headStatus=="2"}}class="c-danger"{{/if}}>{{result.headRange}}</font><br/>'+
                '                       <font>百分位(%)</font>'+
                '                   </div>'+
                '               </div>'+
                '           </li>'+
                '       </ul>'+
                '</script>';
    }
    var trends = function(){
        return  '<script id="growthDetail_trends" type="text/html">'+
                '   {{if curveType == "01"}}'+
                '       <ul class="clear trends {{if userInfo.gender=="F"}}girl{{else}}boy{{/if}}">'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)体重发育曲线</div>'+
                '               <div id="weight" class="bg"></div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)<span class="heightName">身长</span>发育曲线</div>'+
                '               <div id="height" class="bg"></div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)头围发育曲线</div>'+
                '               <div id="head" class="bg"></div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)<span class="length-weight-age">身长别体重发育曲线</span></div>'+
                '               <div id="h-wRatio" class="bg"></div>'+
                '           </li>'+
                '       </ul>'+
                '   {{else}}'+
                '       <div class="outfit fetonTitle {{if userInfo.gender=="F"}}girl{{else}}boy{{/if}}">Fenton(2013)生长曲线</div>'+
                '       <div id="fetonBox" class="fetonBox">' +
                '           <div class="fetonTip"><img src="page/department/img/fentongirl_03.jpg" width="100%" height="100%"/></div>'+
                '           <div id="feton" class="feton bg {{if userInfo.gender=="F"}}girl{{else}}boy{{/if}}"></div>'+
                '       </div>'+
                '   {{/if}}'+
                '</script>';
    }
    var trendsPrint = function(){
        return  '<script id="growthDetail_trendsPrint" type="text/html">'+
                '   {{if curveType == "01"}}'+
                '       <ul class="clear trends">'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)体重发育曲线</div>'+
                '               <div id="weightPrint" class="bg"></div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)<span class="heightName">身长</span>发育曲线</div>'+
                '               <div id="heightPrint" class="bg"></div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)头围发育曲线</div>'+
                '               <div id="headPrint" class="bg"></div>'+
                '           </li>'+
                '           <li>'+
                '               <div class="outfit">WHO(2013)<span class="length-weight-age">身长</span>别体重发育曲线</div>'+
                '               <div id="h-wRatioPrint" class="bg"></div>'+
                '           </li>'+
                '       </ul>'+
                '   {{else}}'+
                '       <div class="outfit">Fenton(2013)生长曲线</div>'+
                '       <div class="printFeton">' +
                '           <div id="fetonPrint" class="fetonBg"></div>'+
                '           <img src="page/department/img/fentongirl_03.jpg" width="100%" height="100%"/>'+
                '       </div>'+
                '   {{/if}}'+
                '</script>';
    }


    return tpl;
});